]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overviewControls: Update work area also on monitors-changed
authorJonas Ådahl <jadahl@gmail.com>
Thu, 2 Feb 2023 14:52:03 +0000 (15:52 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 6 Feb 2023 18:10:01 +0000 (18:10 +0000)
The cached work area, which is the work area of the primary monitor,
effectively depends on two properties - the (global) work area and the
primary monitor - and we are only tracking changes to one of them. Also
track monitor changes to also cover the second case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2623>

js/ui/overviewControls.js

index 29aac35ed0446d6fcfaafee9cad37a872ac63aed..66f291b1071bcdca39e8ec5f6856e6147e8d9cc2 100644 (file)
@@ -50,6 +50,9 @@ class ControlsManagerLayout extends Clutter.BoxLayout {
         global.display.connectObject(
             'workareas-changed', () => this._updateWorkAreaBox(),
             this);
+        Main.layoutManager.connectObject(
+            'monitors-changed', () => this._updateWorkAreaBox(),
+            this);
         this._updateWorkAreaBox();
     }